﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoreEx.MicroMapper.Tests
{
    
    public class Person
    {
        public string Name { get; set; }
    }

    public class Developer
    {
        public string Name { get; set; }
        public string Language { get; set; }
    }

    public class Customer
    {
        public string CustomerID { get; set; }


        public override string ToString()
        {
            if (!string.IsNullOrEmpty(CustomerID))
                return CustomerID;
            else
                return base.ToString();
        }
    }

    public class CustomerExtended
    {
        public string CustomerID { get; set; }
        public string FullContactName { get; set; }
    }

    public class CustomerWithOrders : Customer
    {
        private IList<Order> _orders = new List<Order>();

        public IList<Order> Orders
        {
            get { return _orders; }
            set { _orders = value; }
        }
    }

    public class Order
    {
        private IList<OrderLine> _orderLines = new List<OrderLine>();

        public CustomerWithOrders Customer { get; set; }

        public IList<OrderLine> OrderLines
        {
            get { return _orderLines; }
            set { _orderLines = value; }
        }

        public int OrderID { get; set; }
    }

    public class OrderLine
    {
        public Order Order { get; set; }        
    }
}